package com.example.demo.config;

import org.slf4j.Logger;

//https://devanswers.co/configure-sftp-web-server-document-root/

/**
 *  全局日志工厂
 */
public class DemoLoggerFactory {

    private static final String SERVER_ERROR = "lightingError";

    private static final String SERVER_DEBUG="lightingDebug";

    private static final String SERVER_INFO="lightingInfo";

    private static final String SERVER_MSG = "mqtt_message";

    private static final String DEVICE_SESSION = "deviceSession";

    private static final String HEART_BEAT = "heartBeat";

    private static final String ACK_MESSAGE = "ackMessage";


    private static final String RECORD_ACCUMULATOR_LOG = "recordaccumulator";


    public static Logger getServerErrorLogger(Class<?> clazz) {
        return org.slf4j.LoggerFactory.getLogger(SERVER_ERROR);
    }

    public static Logger getServerInfoLogger(Class<?> clazz){
        return org.slf4j.LoggerFactory.getLogger(SERVER_INFO);
    }

    public static  Logger getServerDebugLogger(Class<?> clazz){
        return org.slf4j.LoggerFactory.getLogger(SERVER_DEBUG);
    }

    public static  Logger getServerMsgLogger(Class<?> clazz){
        return org.slf4j.LoggerFactory.getLogger(SERVER_MSG);
    }


    public static  Logger getDeviceSessionLogger(Class<?> clazz){
        return org.slf4j.LoggerFactory.getLogger(DEVICE_SESSION);
    }


    public static  Logger getHeartBeatLogger(Class<?> clazz){
        return org.slf4j.LoggerFactory.getLogger(HEART_BEAT);
    }

    public static  Logger getAckMessageLogger(Class<?> clazz){
        return org.slf4j.LoggerFactory.getLogger(ACK_MESSAGE);
    }

    public static  Logger getRecordAccumulatorLogger(Class<?> clazz){
        return org.slf4j.LoggerFactory.getLogger(RECORD_ACCUMULATOR_LOG);
    }



}
